<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Regular Expressions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Advanced Bash-Scripting Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="Advanced Topics"
HREF="part5.html"><LINK
REL="PREVIOUS"
TITLE="Advanced Topics"
HREF="part5.html"><LINK
REL="NEXT"
TITLE="A Brief Introduction to Regular Expressions"
HREF="x17129.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Advanced Bash-Scripting Guide: </TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="part5.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x17129.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="REGEXP"
></A
>Chapter 18. Regular Expressions</H1
><TABLE
BORDER="0"
WIDTH="100%"
CELLSPACING="0"
CELLPADDING="0"
CLASS="EPIGRAPH"
><TR
><TD
WIDTH="45%"
>&nbsp;</TD
><TD
WIDTH="45%"
ALIGN="LEFT"
VALIGN="TOP"
><I
><P
><I
>. . . the intellectual activity associated with software
        development is largely one of gaining insight.</I
></P
><P
><I
>--Stowe Boyd</I
></P
></I
></TD
></TR
></TABLE
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>18.1. <A
HREF="x17129.html"
>A Brief Introduction to Regular Expressions</A
></DT
><DT
>18.2. <A
HREF="globbingref.html"
>Globbing</A
></DT
></DL
></DIV
><P
><A
NAME="REGEXREF"
></A
></P
><P
>To fully utilize the power of shell scripting, you need to
	master Regular Expressions. Certain commands
	and utilities commonly used in scripts, such
	as <A
HREF="textproc.html#GREPREF"
>grep</A
>, <A
HREF="moreadv.html#EXPRREF"
>expr</A
>, <A
HREF="sedawk.html#SEDREF"
>sed</A
>
	and <A
HREF="awk.html#AWKREF"
>awk</A
>, interpret and use REs. As of
	<A
HREF="bashver3.html#BASH3REF"
>version 3</A
>, Bash has acquired its
	own <A
HREF="bashver3.html#REGEXMATCHREF"
>RE-match operator</A
>:
	<B
CLASS="COMMAND"
>=~</B
>.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="part5.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x17129.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Advanced Topics</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="part5.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>A Brief Introduction to Regular Expressions</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>